<template>
  <div class="reset-password-container">
    <div class="reset-password-box">
      <h2>重置密码</h2>
      <form @submit.prevent="handleReset">
        <input type="password" v-model="newPassword" placeholder="请输入新密码" required>
        <input type="password" v-model="confirmPassword" placeholder="请确认新密码" required>
        <button type="submit">重置密码</button>
      </form>
      <router-link to="/">返回登录</router-link>
    </div>
  </div>
</template>

<script>
export default {
  name: 'ResetPassword',
  data() {
    return {
      newPassword: '',
      confirmPassword: ''
    }
  },
  methods: {
    handleReset() {
      if (!this.newPassword || !this.confirmPassword) {
        alert('请填写完整信息！');
        return;
      }
      if (this.newPassword !== this.confirmPassword) {
        alert('两次输入的密码不一致！');
        return;
      }
      // 这里可以添加实际的重置密码逻辑
      alert('密码重置成功！');
      this.$router.push('/');
    }
  }
}
</script>

<style scoped>
.reset-password-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.reset-password-box {
  background: white;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
  text-align: center;
}
h2 {
  color: #333;
  margin-bottom: 30px;
  font-size: 24px;
}
form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 20px;
}
input {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
  transition: border-color 0.3s;
}
input:focus {
  outline: none;
  border-color: #667eea;
}
button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 12px;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.2s;
}
button:hover {
  transform: translateY(-2px);
}
</style> 